#include <stdio.h>
int main(void)
{
    int x,k,sum=0;
	scanf("%d",&x);
	while (x){
		k=x%2;
		x=x/2;
		if (k==1)
			sum++;
	}
	printf("%d\n",sum);
	return 0;
}